Use of a data engine within a data processing apparatus

ABSTRACT

A data processing apparatus and method of operation of such a data processing apparatus are disclosed. The data processing apparatus has a main processing unit operable to perform a plurality of data processing tasks, and a data engine for performing a number of those tasks on behalf of the main processing unit. At least one shared resource is allocatable to the data engine by the main processing unit for use by the data engine when performing data processing tasks on behalf of the main processing unit. The data engine comprises a data engine core for performing the tasks, and a data engine subsystem configurable by the main processing unit and arranged to manage communication between the data engine core and an allocated shared resource. The data engine core comprises a resource manager unit for acting as a master device with respect to the data engine subsystem in order to manage use of the allocated shared resource. It has been found that such an approach provides a particularly efficient implementation of a data engine within a data processing apparatus, which reduces the need for re-writing of existing code to enable it to be executed on such a data processing apparatus.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a Continuation-In-Part of U.S. application Ser. No.11/121,185, filed 4 May 2005 (now U.S. Pat. No. 7,630,388) and claimspriority to EP Application No. 05256176.8 filed 3 Oct. 2005. The entirecontents of these applications are incorporated herein by reference.

Related co-pending U.S. patent application Ser. No. 11/402,192, filedApr. 12, 2006, Matterne et al, is commonly owned and herein incorporatedby reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a data processing apparatus and method,and in particular to use of a data engine within such a data processingapparatus.

2. Background of the Invention

In a data processing apparatus having a main processing unit, it isknown to provide a data engine, sometimes also referred to as aloosely-coupled coprocessor (loosely coupled in the sense that itresides externally to the main processing unit and that synchronisationbetween the data engine and the main processing unit only takes place ona process or task level), which can be used to handle certain dataprocessing tasks on behalf of the main processing unit. This can lead tovarious improvements with respect to a data processing apparatus whereall of the tasks are handled by the main processing unit, theseimprovements being for example one or more of an increase in speed ofexecution, a reduction in power consumption for a given set of tasks, ora decrease in the total silicon area required to support the requiredfunctionality.

One example of such a data engine is a Digital Signal Processor (DSP),which can be considered to be a processing unit optimised for handlingspecific processing tasks and which typically has its own dedicatedresources, for example its own interrupt controller, its own DirectMemory Access (DMA) logic, etc. Whilst the use of such DSPs can be veryeffective in improving performance of the data processing apparatus,they are expensive to provide within a data processing apparatus, due tothe need to provide the DSP with all of the dedicated resources neededto enable the DSP to perform the required processing task on behalf ofthe main processing unit.

An alternative to such DSPs is to provide a data engine of the type thathas no local resources dedicated to it, such a data engine acting as apure slave device for the main processing unit. In such examples, themain processing unit dispatches a particular task to the data engine,along with all the data required by the data engine to perform thattask, and subsequently receives a confirmation signal from the dataengine when that task has been completed. On receipt of such aconfirmation signal, a further task can then be dispatched from the mainprocessing unit to the data engine. Whilst such a data engine can besignificantly cheaper to implement than the earlier-mentioned DSP, dueto the fact that it requires no local resources to be provided for thedata engine, there is significant overhead on behalf of the mainprocessing unit in handling the allocation of individual tasks to thedata engine, and ensuring that the data engine is provided with all thedata it needs to perform the task, thereby resulting in significantglobal system activity to support the data engine's activities. This notonly deteriorates performance in terms of compute cycles and powerconsumption, but also often results in the need to significantlyre-write existing software to enable that software to be run on a dataprocessing apparatus including such a data engine, which is clearlyundesirable.

A middle ground approach that has been developed between the abovedescribed DSP approach, where all resources required by the DSP areprovided locally to the DSP and dedicated to the DSP, and the dataengine approach where the data engine has no local/dedicated resources,is to provide a data engine which can have access to certain resources,but those resources are shared with other elements of the dataprocessing apparatus. Hence, whilst those resources, or portions ofthose resources, may be dedicated to the data engine for a particularsession (a session typically containing a group of tasks to beperformed), those resources can be re-allocated in a subsequent sessionto other elements of the data processing apparatus.

When providing a data engine with access to certain shared resources, asubsystem layer can be provided between the main processing unit and thedata engine to provide some decoupling of the data engine from the mainprocessing unit. The main processing unit can then allocate a group oftasks to the data engine, and the subsystem then handles the dispatch ofeach individual task to the data engine for handling. The subsystem canalso cause the allocated shared resources to be accessed as and whenrequired to enable the data engine to perform the required tasks. Insuch an approach, the subsystem adopts a master role with respect to thedata engine, and the data engine again acts as a pure slave. Whilst suchan approach can remove some of the task management complexities from themain processing unit, by allowing the main processing unit to dispatch agroup of tasks to the subsystem for handling by the data engine, itstill will often require a significant re-writing of existing softwareto enable that software to execute on the data processing apparatus. Inparticular, when the software implementing a particular task waswritten, it may have been assumed that such a task would be performed bya processing unit that was able to exhibit some master functionality,and hence could initiate certain events. However, as discussed above,when a task is allocated to the data engine by the subsystem, the dataengine itself acts as a pure slave device, and cannot initiate anyevents.

A further problem with the approach described above is that it presentsthree different program points of view within the system. In particular,in addition to requiring the main processing unit and the data engine tobe programmed, the subsystem also requires some programming, since itacts like a local processing unit in its own right, due to therequirement for it to manage the dispatch of individual tasks to thedata engine, and manage the access to the shared resources as requiredin order to ensure that the data engine is provided with all the data itrequires to perform such tasks. Further, it does not help in reducingglobal system activity, since use of the shared resources requiressignificant communication with the main processing unit.

Accordingly, it would be desirable to provide an improved data enginefor use within a data processing apparatus, that can provide significantcost savings with respect to the use of a DSP, and which can reduce therisks of having to significantly re-write software to enable it to runon a system including that data engine.

SUMMARY OF THE INVENTION

Viewed from a first aspect, the present invention provides a dataprocessing apparatus comprising: a main processing unit operable toperform a plurality of data processing tasks; a data engine operable toperform a number of said data processing tasks on behalf of the mainprocessing unit; at least one shared resource allocatable to the dataengine by the main processing unit for use by the data engine whenperforming said number of data processing tasks; the data enginecomprising a data engine core operable to perform said number of dataprocessing tasks, and a data engine subsystem configurable by the mainprocessing unit and operable to manage communication between the dataengine core and an allocated shared resource; the data engine corecomprising a resource manager unit operable to act as a master devicewith respect to the data engine subsystem to manage use of the allocatedshared resource.

In accordance with the present invention, the data engine has a dataengine core for performing tasks on behalf of the main processing unit,and a data engine subsystem which is configurable by the main processingunit, and is arranged to manage communication between the data enginecore and an allocated shared resource, the allocated shared resourcebeing a resource which has been allocated to the data engine by the mainprocessing unit for use by the data engine when performing the tasks.

The entirety of the shared resource may be allocated to the data enginefor some period, typically a session, or instead only a portion of theresource may be allocated with other portions being allocated to otherelements of the data processing apparatus. Where a portion of a resourceis allocated to the data engine, that portion may be a physical portion,for example a region of memory, a limited number of channels of a DMAcontroller, etc, or may be a functional portion identifying a particularsubset of the functionality supported by the shared resource, forexample allowing the data engine read access but no write access. Hence,a shared resource can either be dedicated to the data engine for aperiod, or can be shared between the data engine and other elements(which may for example also be data engines) during that period, but inthe latter case the data engine is typically only allocated access to aphysical or functional portion that does not conflict with physical orfunctional portions allocated to the other elements.

Furthermore, in accordance with the present invention, the data enginecore has a resource manager unit which acts as a master device withrespect to the data engine subsystem in order to manage use of theallocated shared resource. By such an approach, the data engine core isable to perform a variety of different actions that existing softwaremay have expected the processing unit executing that software to havethe capability to perform. This can significantly reduce the extent towhich existing software needs to be re-written in order to enable it tobe executed on a data processing apparatus including such a data engine.Furthermore, since access to the shared resources is tightly integratedin the data engine via the resource manager unit, these resources can beless costly than a resource that has to function on its own.

Additionally, by providing the resource manager unit within the dataengine core to act as a master device with respect to the data enginesubsystem, this can alleviate the requirement to separately program thedata engine subsystem, and accordingly can reduce the number of programpoints of view that might otherwise be present, thereby significantlyreducing the complexity of the design. The resource manager unit may beformed as a hardware unit, or alternatively may be formed as a mixtureof hardware and software elements.

The shared resource may be shared with any other elements of the dataprocessing apparatus, for example the main processing unit, or anyfurther data engines provided within the data processing apparatus. Inone embodiment, multiple data engines may use the same data enginesubsystem and in that case the shared resource may actually residewithin the data engine subsystem. Typically, the main processing unitwill be arranged to configure the data engine subsystem and allocate anyrequired shared resources to the data engine, on a session-by-sessionbasis, where each session will typically comprise a plurality of tasksto be performed on the data processing apparatus. Hence, for theduration of the session, the configuration of the data engine subsystemwill not change, and the allocation of the shared resources will notchange. However, the resource manager unit can be used to manage the wayin which the allocated shared resources are used during the session.

The provision of the resource manager unit within the data engine to actas a master device with respect to the data engine subsystem allows thedata engine access during the session to the shared resources withoutintervention from/interaction with the main processing unit, therebyreducing global system activity and hence producing performanceimprovements and reducing energy consumption. For example, the reductionin global system activity can increase the likelihood of the mainprocessing unit being able to adopt a low power mode for more proportionof the time.

The main processing unit can take a variety of forms. For example, itmay be a central processing unit (CPU), or alternatively may be someother simplified control element within the data processing apparatus,for example a control element which merely controls boot up, and thendelegates all other tasks to one or more data engines.

There are a number of ways in which the resource manager unit can act asa master device to manage use of the allocated shared resource. In oneembodiment, the number of data processing tasks to be performed by thedata engine comprise a sequence of instructions, including at least oneinstruction of an instruction set executable by the data engine core tocause said resource manager unit to act as said master device, uponexecution of said at least one instruction the resource manager unitbeing operable to issue a control command to the data engine subsystemto thereby manage use of the allocated shared resource. Hence, inaccordance with such embodiments, the data engine subsystem is caused tomanage use of the allocated shared resource in the desired mannerthrough the issuance of control commands from the resource manager unitto the data engine subsystem.

In one particular embodiment, the data engine subsystem comprisescontrol logic operable to receive the control command from the resourcemanager unit and to control use of the allocated shared resourcedependent on that control command. In one embodiment, the control logicwithin the data engine subsystem will comprise three interfaces, thefirst interface being a configuration interface through which theoperation of the control logic can be configured by the main processingunit, the second interface being a control interface via whichcommunications between the resource manager unit of the data engine coreand the control logic of the data engine subsystem can take place, andthe third interface being an interface between the control logic and theparts of the data processing apparatus external to the data engine, viawhich the control logic can bring about the management of the allocatedshared resource as dictated by the resource manager unit.

The instructions provided within the instruction set executable by thedata engine core can take a variety of forms. In one embodiment, theinstruction set executable by the data engine core comprises at leastone transfer initiation instruction which when executed causes theresource manager unit to act as said master device. Hence, in suchembodiments, execution of the transfer initiation instruction will causean appropriate control command to be issued to the data engine subsystemto initiate some operation, for example the transfer of some data, theissuance of an interrupt signal to an interrupt controller, thereprogramming of an allocated region of memory, etc.

In one embodiment, the allocated shared resource and the data enginecore operate concurrently with each other, and the instruction setexecutable by the data engine core comprises at least onesynchronisation instruction which when executed causes a synchronisationto occur between the allocated shared resource and the data engine core.Since the allocated shared resource operates concurrently with respectto the data engine, both the allocated shared resource and the dataengine can be performing, at any particular point in time, operationsindependently of each other, but without knowledge of each other'sstate. The use of a synchronisation instruction hence allows asynchronisation point to be reached where synchronisation between theallocated shared resource and the data engine take place. This isbeneficial, since it will often be the case that points will be reachedwithin program code, where the next instruction cannot execute untilsuch synchronisation is in place.

As mentioned previously, the main processing unit can change theconfiguration of the data engine subsystem at certain points in time,typically when switching to a new session. However, any such change tothe configuration implies a reset of various parts of the dataprocessing apparatus which have operated in dependence on the currentconfiguration. In a typical embodiment, it will be important to ensurethat such a process is handled carefully, and in particular it may beimportant to ensure that the data engine core and the allocated sharedresource are synchronised prior to such a change taking place.Accordingly, in one embodiment, when the main processing unit indicatesa new configuration for the data engine subsystem, the data engine coreis operable to execute one of said synchronisation instructions in orderto cause a synchronisation point to be reached where the allocatedshared resource and the data engine are synchronised, and the newconfiguration is only effected within the data engine subsystem afterthe synchronisation point is reached.

The data engine core can be arranged in a variety of ways. However, inone embodiment the data engine core comprises data path logic consistingof a plurality of functional units, one of said functional units beingthe resource manager unit, the data engine core further comprising acontroller operable to control, for each instruction in the sequence,which functional unit acts upon that instruction. Hence, in accordancewith such embodiments, multiple functional units can be provided withinthe data engine core, with each functional unit being used to act uponparticular types of instructions in order to provide fast and efficientprocessing of those instructions, with a controller being used to ensurethat the individual instructions of an instruction sequence are actedupon by the appropriate functional units. In one embodiment eachinstruction is executed by the controller to produce control signals tobe routed to the appropriate functional unit, whilst in an alternativeembodiment the controller may merely route each instruction to theappropriate functional unit for execution by that functional unit.

In one embodiment, a data engine compiler is provided for scheduling thesequence of instructions to be executed by the data engine core. The aimof the compiler is to ensure that the sequence of instructions areexecuted in as efficient a manner as possible having regard to thestructure of the data engine core. In accordance with one embodiment ofthe present invention, the instruction set executable by the data enginecore comprises at least one bound instruction identifying a boundcondition, the compiler being operable, on encountering one of saidbound instructions, to schedule execution of subsequent instructions inthe sequence having regard to the bound condition. As an example, thebound instruction may identify a group of addresses that are to besubjected to a DMA procedure, and the compiler may be operable toschedule as the instructions immediately following that boundinstruction instructions which do not require access to those group ofaddresses.

It should be noted that in some embodiments the bound conditionspecified by a bound instruction can also be used in other ways, toensure efficient processing by the data engine core. For example, in oneembodiment, the bound condition can be conveyed from the resourcemanager unit to the control logic of the data engine subsystem in orderto set a semaphore which will cause the data engine core to stall if itrequires any access to addresses within the address range specified bythe bound condition. When the bound condition is no longer required, thesemaphore can be cleared, thereby allowing the data engine core tocontinue with the access that had caused it to stall.

The resource manager unit can be used in a variety of ways. Inaccordance with one embodiment, the resource manager unit is operable asa data transfer controller synchronised with the data engine. Hence, byway of example, when acting as a master device, the resource managerunit will act as a data transfer initiating device, and in addition ifused as a slave device, the resource manager unit can act as a data gatedevice.

In one embodiment, the allocated shared resource comprises DMA logic,and the resource manager unit is operable to act as a DMA master deviceto initiate a transfer of data using said DMA logic. Accordingly, insuch embodiments, the resource manager unit of the data engine core isable to initiate data transfers of its own volition, as and when theyare required as a result of the tasks being executed by the data engineon behalf of the main processing unit. Such data transfers may involvethe transfer of data into the data engine, or the transfer of data outof the data engine.

In one embodiment, the allocated shared resource comprises an interruptcontroller, and the resource manager unit is operable to issue aninterrupt for routing via the data engine subsystem to the interruptcontroller. Hence, this enables interrupt-based processing to beperformed directly by the data engine core, and hence when the dataengine needs to send a signal to another device, the resource managerunit can cause an appropriate interrupt signal to be issued.

In one embodiment, the allocated shared resource comprises a region ofmemory, and the resource manager unit is operable to issue controlsignals for initiating a change of use of one or more portions of thatregion of memory. Hence, within a particular session, this enables thedata engine to optimise the use of the allocated memory resource havingregard to the tasks being executed.

In embodiments where the allocated shared resource comprises a region ofmemory, the instruction set executable by the data engine core maycomprise at least one management instruction to enable dynamic runtimemanagement of the region of memory. Hence, by way of example, part ofthe region of memory may be used to implement a software FIFO structuredefined by a head pointer and a tail pointer, and the managementinstruction may perform dynamic runtime management of that softwareFIFO, for example by querying the head pointer, setting the tailpointer, configuring the software FIFO, etc.

In one embodiment, the instruction set executable by the data enginecore comprises at least one scheduling instruction which when executedcauses a task to be scheduled for execution by the allocated sharedresource. This may for example be appropriate if the resources requiredto execute the task are not immediately available, and in such instancesthe task can be queued for execution when the resources becomeavailable.

In one embodiment, the instruction set executable by the data enginecore comprises at least one registering instruction which when executedwhilst the data engine core is performing a first data processing taskcauses a second data processing task to be registered for execution. Bysuch an approach, the resource manager unit in one embodiment providesan interface that allows one task to register subsequent tasks with somescheduling routine, for example the scheduler part of the operatingsystem.

In one embodiment the instruction set executable by the data engine corecomprises at least one callback instruction, if the data engine coredetermines whilst performing a first data processing task that at leastone condition for performance of that task is not satisfied, the dataengine core being operable to execute the callback instruction to causethe resource manager unit to identify to the data engine subsystem thatthe first data processing task should be re-invoked once said at leastone condition is satisfied, thereby allowing the data engine core toterminate execution of the first processing task until the at least onecondition is satisfied. Hence, through such embodiments, the data enginecore can decide to terminate execution of a particular task if a certaincondition is not satisfied, with the resource manager unit thenproviding a mechanism for advising the data engine subsystem that thetask should be re-invoked at some later point when the condition issatisfied. This approach hence supports flexibility in how tasks areexecuted by the data engine core, without needing to add any schedulingcomplexity to the data engine core itself.

In one embodiment, the data engine comprises a stub layer which when adata processing task is to be performed by the data engine core isoperable to check for one or more prerequisites required by that dataprocessing task before allowing the data processing task to be performedby the data engine core. Such prerequisites may for example be theavailability of certain program data, constant table data, stateallocations, etc. Through the use of such a stub layer a moregeneralised task model can be implemented on the data engine, whereinstead of merely executing a task, certain checking procedures canfirst be invoked.

In one such embodiment the instruction set executable by the data enginecore comprises at least one request instruction, and when the stub layerdetermines that at least one prerequisite required by the dataprocessing task is not satisfied, the request instruction is executed tocause the resource manager unit to output a request command to the dataengine subsystem asking for that at least one prerequisite to besatisfied. By such an approach, the actual execution of the task by thedata engine core can be deferred until the at least one prerequisite issatisfied.

In one embodiment, the instruction set executable by the data enginecore comprises at least one error handling instruction, when at leastone prerequisite required by the data processing task cannot besatisfied the error handling instruction being executed to cause theresource manager unit to output any required error condition and causethe data processing task to be exited. In embodiments using the earliermentioned stub layer, the execution of the error handling instructioncan be arranged to cause an exit command to be issued from the resourcemanager unit to the stub layer to cause an exit routine to be executed.

In the above discussions, the instruction set executable by the dataengine core has been described as including a variety of different typesof instructions, and in particular has been described as includingtransfer initiation instructions, synchronisation instructions, boundinstructions, scheduling instructions, registering instructions,callback instructions, request instructions and error handlinginstructions. It should be noted that any particular instruction maybelong to more than one of these instruction types. For example, atransfer initiation instruction may also be a bound instruction. Forexample, a DMA start instruction may define a range of addresses to besubjected to the DMA operation. As another example, a transferinitiation instruction may be considered to be a scheduling instructionin situations where the resources required to implement the taskidentified by the instruction are not currently available.

From the above description, it will be appreciated that the allocatedshared resource can take a variety of forms. In one embodiment, theallocated shared resource is an element of the data processing apparatusfacilitating communication between the data engine and a processing unitof the data processing apparatus. The processing unit with which theallocated shared resource facilitates communication with the data enginemay take a variety of forms, and hence for example may be the mainprocessing unit, or some other processing unit within the dataprocessing apparatus, such as for example another data engine.

The instructions of the instruction set executable by the data enginecore can take a variety of forms. However, in one embodiment, at leastone instruction in the instruction set executable by the data enginecore is arranged to cause the return of a flag to indicate if theinstruction was executed successfully, whereby in the absence of theflag the data engine core will stall and enter a power saving mode.Hence in accordance with such an embodiment, the instruction is seen asreturning unconditionally from the data engine core's perspective, suchthat the data engine core stalls in the absence of the return flag. Thisprovides a particularly power efficient implementation within the dataengine, by enabling the data engine core to automatically stall andenter a power saving mode in the absence of a flag being returned.

In one embodiment, some instructions will be blocking and will issue astall until they have finished, these being instructions which willcause the return of a flag. Other instructions will be non-blocking,such non-blocking instructions either implementing an action that isguaranteed to finish in a fixed number of cycles (for example whenrequesting status info), or starting an action for which the data enginecore does not need to know a result, or the result is not neededimmediately (for example when a second command will be used to do thesynchronization).

Viewed from a second aspect, the present invention provides a method ofoperating a data processing apparatus having a main processing unitoperable to perform a plurality of data processing tasks, and a dataengine operable to perform a number of said data processing tasks onbehalf of the main processing unit, the method comprising the steps of:allocating to the data engine at least one shared resource for use bythe data engine when performing said number of data processing tasks;performing said number of data processing tasks using a data engine coreof the data engine; configuring a data engine subsystem used to managecommunication between the data engine core and the allocated sharedresource; and employing a resource manager unit within the data enginecore to act as a master device with respect to the data engine subsystemto manage use of the allocated shared resource.

Viewed from a third aspect, the present invention provides a data enginefor a data processing apparatus having a main processing unit operableto perform a plurality of data processing tasks, the data engine beingoperable to perform a number of said data processing tasks on behalf ofthe main processing unit, and being allocated at least one sharedresource of the data processing apparatus for use when performing saidnumber of data processing tasks, the data engine comprising: a dataengine core operable to perform said number of data processing tasks; adata engine subsystem configurable by the main processing unit andoperable to manage communication between the data engine core and theallocated shared resource; and a resource manager unit within the dataengine core operable to act as a master device with respect to the dataengine subsystem to manage use of the allocated shared resource.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be described further, by way of example only,with reference to embodiments thereof as illustrated in the accompanyingdrawings, in which:

FIG. 1 is a block diagram of a data processing apparatus in accordancewith one embodiment of the present invention;

FIG. 2 is a block diagram illustrating in more detail the elementsprovided within at least one of the data engines of FIG. 1 in accordancewith one embodiment of the present invention;

FIG. 3 is a block diagram illustrating in more detail the componentsprovided within at least one of the data engines of FIG. 1 in accordancewith one embodiment of the present invention;

FIG. 4 is a flow diagram illustrating steps performed by the dataprocessing apparatus when initialising a session, in order to causecertain tasks to be executed by a data engine of one embodiment of thepresent invention;

FIGS. 5 to 9 are transaction diagrams illustrating various transactionstaking place between the host processor, data engine and sharedresources of particular embodiments of the present invention; and

FIG. 10 is a diagram schematically illustrating changes that may beeffected within a memory region allocated to a data engine in accordancewith one embodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

FIG. 1 is a block diagram of a data processing apparatus in accordancewith one embodiment of the present invention. The data processingapparatus 10 has a host processor 20 which can communicate via a hostbus 40 (which may in fact constitute a network of separate buses) with avariety of other devices connected to the host bus. In particular, amemory device, such as SDRAM 30, can be provided for storing datarequired by the host processor. Similarly, one or more data engines 60,70 may be provided for performing certain tasks on behalf of the hostprocessor 20. In addition, one or more shared resources 50 may beprovided which can be allocated by the host processor 20 to one or bothof the data engines 60, 70 for use by that data engine when performingtasks on behalf of the host processor 20.

The shared resources 50 can take a variety of forms and may consist ofone or more separate resources. Examples of such shared resources are,without limitation, a DMA logic unit for managing data transfers, avectored interrupt controller (VIC) for handling interrupt requests, aregion of memory, a communication exchange element for facilitatingcommunication between a data engine 60, 70 and some other element of thedata processing apparatus 10, for example the host processor 20 oranother data engine, etc.

In accordance with the embodiments of the present invention, at leastone of the data engines 60, 70 is a data engine which has a data enginecore for performing the data processing task, and a data enginesubsystem configurable by the main processing unit and arranged tomanage communication between the data engine core and an allocatedshared resource. An application being run on the data processingapparatus will typically consist of a number of separate sessions, andfor each session the host processor 20 is arranged to configure the dataengine subsystem and to allocate one or more of the shared resources foruse by the data engine during that session. The data engine core will inone embodiment be configured via control logic within the data enginesubsystem, or alternatively may be configured via a stub layer providedwithin the data engine, the stub layer being described in more detaillater with reference to FIG. 9.

If both of the data engines 60, 70 are data engines of the typedescribed above, then each data engine will have its own data enginecore. In one embodiment, each data engine will also have its own dataengine subsystem, but it should be noted that in alternative embodimentsthe data engines 60, 70 may share a data engine subsystem.

FIG. 2 is a block diagram illustrating in more detail the logic providedwithin at least one of the data engines 60, 70 in accordance with oneembodiment of the present invention. In particular, in one embodiment,it is assumed that at least data engine 60 is of the above describedtype, and accordingly contains a data engine subsystem 100 and a dataengine core 130. The data engine core has a data path 150 which willtypically include a number of functional units for acting in response toinstructions constituting the tasks being handled by the data engine.The controller 140 within the data engine core 130 is responsible forensuring that the individual instructions of an instruction sequence areacted upon by the appropriate functional units within the data path 150.

The data engine core 130 communicates with the external environment,i.e. those parts of the data processing apparatus 10 external to thedata engine 60 and hence in particular including the shared resources50, via the data engine subsystem 100. As mentioned earlier, the dataengine subsystem is configured by the main processing unit on asession-by-session basis and is arranged to manage communication betweenthe data engine core and the allocated shared resources. In particular,the data engine subsystem 100 includes glue logic 120 which isconfigured by the host processor 20 to allow appropriate communicationbetween the data engine core 130 and the external environment, includingthe shared resources 50.

In addition to the glue logic 120, the data engine subsystem 100 caninclude one or more non-shared resources 110, these being resourceswhich are dedicated to a data engine core connected to that data enginesubsystem 100. An example of such non-shared resources may be a portionof memory specifically dedicated to a data engine 60.

FIG. 3 is a block diagram illustrating in more detail the elementsprovided within the data engine 60, and optionally the data engine 70,in accordance with one embodiment of the present invention. As shown inthe example of FIG. 3, a non-shared resource in the form of a TightlyCoupled Memory (TCM) 230 is provided within the data engine subsystem100, this TCM 230 being dedicated to the data engine core 130.

The glue logic 120 actually consists of a number of components. Inparticular, the glue logic 120 includes a decoder 200 which is connectedto a configuration port 202 by which the decoder receives configurationsetting information from the host processor 20. The decoder 200 willdecode this configuration setting information, in order to causeappropriate control signals to be sent to the other elements of the dataengine subsystem 100 in order to cause the required configuration of thedata engine subsystem to take place.

The glue logic 120 also includes control logic 210 which can issuecontrol signals to various other components within the data enginesubsystem 100, and also to elements of the external environment via thecommunications port 204 of the data engine subsystem. In addition, inaccordance with one embodiment of the present invention, the controllogic 210 is coupled to a resource manager unit 270 provided within thedata path 150 of the data engine core 130, this resource manager unitalso being referred to herein as a system-call functional unit (SCFU).The SCFU 270 can act as a master device with respect to the data enginesubsystem 100 in order to allow the data engine core 130 to initiatesynchronisation, control transaction and data transfers between the dataengine core 130 and the external environment, including any allocatedshared resources 50. In particular, a set of instructions are providedwhich can be acted upon by the SCFU 270 in order to cause correspondingcontrol commands to be issued from the SCFU 270 to the control logic 210within the data engine subsystem 100 in order to cause the requiredfunctions to take place. A communications port 282 is provided withinthe data path 150 via which the SCFU 270 can communicate with thecontrol logic 210, and by which the control logic 210 can communicatewith the SCFU 270. The SCFU 270 also has an input/output port 274through which communications between the controller 140 and the SCFU 270can take place.

Hence, the SCFU 270 can be viewed as an interface that allows the dataengine core 130 to make its intentions known through the issuance ofmessages to the data engine subsystem 100. Similarly, the host processor20 can make its intentions known (e.g. it would like to change asession). The sub-system control logic 210 then combines thisinformation and takes the appropriate action, as will be discussed inmore detail later by way of example with reference to the transactiondiagrams of FIGS. 5 to 9.

The data engine subsystem 100 of the example of FIG. 3 also includes aDMA interface 220 which is coupled to a data port 208, via which DMAtransactions can take place between the data engine subsystem 100 andthe external environment.

The TCM 230 as shown in FIG. 3 will actually consist of the TCM itselfand the associated control logic provided in association with the TCM,for example to arbitrate between multiple requests for access to theTCM. The control logic 210 can issue control signals to the TCM controllogic to configure the TCM 230 as required.

In addition to the SCFU 270, the data path 150 also includes a pluralityof functional units 250, 260, and each functional unit can be consideredto have two interfaces 252, 254 and 262, 264, respectively. Both ofthese interfaces are visible from the data path 150, and hence theproperties of these interfaces are known by a data engine compiler (notshown) used to compile instructions for processing by the data path 150.In contrast, it should be noted that the SCFU 270 has one interface 274which is visible from the data path 150, and hence is known to thecompiler, but its other interface is the communications port 282 whichis visible from the data engine subsystem 100, and thus invisible to thecompiler. It should be noted that the SCFU 270 can also optionally beprovided with a third interface (not shown) to the external environment,over which functionality assigned to the SCFU can be configured. Thisoptional third interface can for example be a service access protocol(SAP) interface.

As also shown in FIG. 3, a number of data ports 284, 286 can be providedwithin the data path 150 via which the functional units 250, 260 canreceive data from, and output data to, other elements of the dataprocessing apparatus via the data engine subsystem 100. In oneembodiment, each of these data interfaces 284, 286 can be used by eachof the functional units 250, 260. In the particular example illustratedin FIG. 3, one data port 284 is coupled to the TCM 230 to enable data tobe exchanged between the functional units 250, 260 and the TCM 230,whilst another data port 286 is coupled through the data enginesubsystem 100 to the data port 206 of the data engine subsystem, toallow data to be communicated between the data engine core 130 andmemory forming a shared resource within the external environment.

The SCFU 270 can be operated through a set of instructions that are anintegral part of the data engine architecture (i.e. the whole of thedata engine capabilities/instruction set). In one embodiment, those SCFUspecific instructions are constrained to be modelled as a standard OSI(Open Systems Interconnection) layer or common OS (Operating System)calls. By such an approach, the software porting effort when adaptingsoftware to run on a data processing apparatus including such a dataengine can be significantly reduced.

As discussed earlier, the SCFU 270 within the data path 150 can act as amaster device with respect to the data engine subsystem 100 to manageuse of any allocated shared resources 50 allocated to the data engine 60by the host processor 20. In one example of such use, the SCFU 270 canact as a data transfer controller synchronised with the data engine core130. As an example, if an allocated shared resource comprises DMA logic,the SCFU 270 can act as a DMA master device to initiate a transfer ofdata using that DMA logic. In particular, the controller 140 can executean instruction in order to issue control signals to the SCFU 270 overpath 147 and via the port 274 to cause a control command to be issuedvia the communication port 282 to the control logic 210 to seek to run aDMA transfer process. This will result in the control logic 210 sendingan appropriate control signal to the DMA interface 220 to cause atransfer request to be output by the DMA interface 220 via the data port208 to the DMA logic provided externally to the data engine 60. Thiswill initiate a DMA transfer of data via the DMA logic. In one example,the data may be transferred from some external memory into the TCM 230within the data engine subsystem 100, so that it can be quickly accessedby the data path 150 of the data engine core 130. In this example thedata will be routed from the DMA logic via the data port 208 to the DMAinterface 220, from where that data will then be routed from the DMAinterface 220 to the TCM 230 for storage therein. The stored data canthen subsequently be accessed by the data path 150 through the data port284 coupling the data path 150 with the TCM 230.

As another example of functionality that may be implemented through useof the SCFU 270, the controller 140 can cause the SCFU 270 to issue acontrol command to the control logic 210 to cause an interrupt requestto be output via the communications port 204 to a shared resource in theform of a vectored interrupt controller (VIC). This mechanism henceallows interrupt driven processing to be implemented efficiently by thedata engine core 130, whereas previously such a data engine core 130would only be able to act as a slave style device, and accordingly wouldnot be able to issue interrupts of its own volition.

In another example, the shared resource may take the form of a region ofmemory shared between the data engine core 130 and some other element ofthe data processing apparatus. In such examples, although the particularregion of memory allocated to the data engine 60 will have been fixed bythe host processor 20 for the duration of the session, the SCFU 270 canbe used to alter the way in which that region of memory is used duringthe session in question. In particular, an instruction can be executedwhich causes the SCFU 270 to route a control signal via the controllogic 210 and the communication port 204 to the memory controller of thememory region in question to implement the required change of use ofthat region of memory.

It should be noted that in embodiments where the data engine subsystem100 is shared between multiple data engine cores 130, then the TCM 230can itself be considered as a shared resource, in that it can be sharedbetween the multiple data engine cores 130. In such instances, the samemechanism can be used to change the use of particular memory regionswithin the TCM 230, with the relevant control signal being routed fromthe SCFU 270 via the control logic 210 to the memory control logicwithin the TCM 230.

In one embodiment, when the allocated shared resource includes a regionof memory, the data engine core 130 can be arranged to executemanagement instructions which perform dynamic run-time management ofthat region of memory. For example, in one embodiment a software-definedFIFO may be implemented within the region of memory, where the extent ofthe FIFO is defined by a head pointer and a tail pointer. The SCFU 270may be arranged to act upon instructions to configure that softwareFIFO, to cause data to be loaded into that software FIFO, to cause datato be saved from that software FIFO to memory, to query the headpointer, to set the tail pointer, etc. Such functions allow for dynamicruntime management of the memory efficiently through use of the SCFU 270and the control logic 210 in the data engine subsystem 100.

In one embodiment, the allocated shared resource and the data enginecore 130 operate concurrently with each other, and hence cansimultaneously be performing respective operations without knowledge ofeach other's state. The sequence of instructions being executed by thedata engine may be such that at particular points in time it isnecessary to ensure that the activities of the allocated shared resourcehave been synchronised with the activities of the data engine core priorto that instruction being executed. In one embodiment of the presentinvention, this can be achieved by arranging the SCFU 270 to act upon asynchronisation instruction to cause synchronisation to occur betweenthe allocated shared resource and the data engine core. Suchsynchronisation instructions may be explicit or implicit. An example ofan explicit synchronisation instruction is where following a DMA startinstruction to cause a shared resource in the form of a DMA engine toinitiate a DMA transfer, a DMA done instruction is executed. Each of theinstructions in the instruction set acted upon by the SCFU 270 cause aflag to be returned to indicate if the instruction was executedsuccessfully, and hence these instructions are viewed from the dataengine core's perspective as returning unconditionally. For the DMA doneinstruction, a flag will only be returned when the control logic 210within the data engine subsystem 100 has determined that the requiredDMA transfer has completed. Until such time that the flag is returned,the data engine core 130 will stall, this causing a synchronisationbetween the allocated shared resource (in this example the DMA logic)and the data engine core, since it is only when the DMA transfer hascompleted that the data engine core 130 will proceed to execute the nextinstruction.

As an alternative to such an explicit synchronisation instruction, thesynchronisation instruction may be implicit. Again, considering theexample of a DMA transfer performed by a shared resource in the form ofDMA logic, a DMA start instruction executed to initiate the DMA transfermay also specify arrange a range of addresses to be subject to that DMAtransfer. This range of addresses can be seen as specifying a boundcondition which will in one embodiment cause the control logic 210within the data engine subsystem 100 to set a semaphore. This will causethe data engine core 130 to stall if it tries to execute an instructionrequiring access to one of the data addresses within that range. Onlywhen the DMA transfer has completed, and accordingly the semaphore hasbeen cleared, will the data engine core 130 then be able to continueexecution of that instruction, thereby forcing a synchronisation to takeplace.

Such synchronisation instructions can also be used to ensure that theactivities of the various elements of the data processing apparatusrelying on a particular configuration of the data engine subsystem 100are synchronised prior to that configuration changing. As mentionedearlier, the main processing unit 20 may change the configuration of thedata engine subsystem between sessions. If the main processing unitindicates a new configuration for the data engine subsystem, then asynchronisation instruction can be executed to cause a synchronisationpoint to be reached where the allocated shared resource(s) and the dataengine 60 are synchronised, such that the new configuration is onlyeffected within the data engine subsystem after the synchronisationpoint has been reached. This ensures correct operation of the dataprocessing apparatus when transitioning between one configuration of thedata engine subsystem and another.

If during a session change concurrent processes are still active in thedata engine subsystem (working lower in the OSI hierarchy), then theseare only aborted or reset in dependence of the specific requirements ofthe session change. For example on an accepted synchronization point, acodec related parameter may be changed, for which it is not necessary toabort the output stream, which is effectively continuous. On anotherchange, the input file may be switched, which does require the outputstream to be aborted as well. Hence, in summary, processes are onlyreset if needed.

The earlier-mentioned bound conditions that may be specified byparticular instructions acted upon by the SCFU 270 can also be used bythe data engine compiler used to schedule the sequence of instructionsfor execution by the data engine core 130, with the aim of improving theefficiently with which the data engine core 130 can execute thoseinstructions. In particular, the compiler can be arranged, onencountering an instruction that sets a bound condition, to analyse thebound condition and to schedule execution of subsequent instructions inthe sequence having regard to the bound condition. For example, if thebound condition specifies a range of memory addresses to be subjected toone or more operations specified by the instruction setting that boundcondition, then the compiler can be arranged to reorder the immediatelyfollowing instructions with the aim of finding a number of immediatelyfollowing instructions which do not require access to any of theaddresses set by the bound condition. This hence will reduce the chancethat the data engine core 130 will need to stall when executing thesequence of instructions, and accordingly can improve the speed andefficiency of the data engine core.

It is possible that when a particular task is to be undertaken by thedata engine core 130, the actual resources required to perform that taskare not yet available. To deal with such a scenario, the SCFU 270 can bearranged to issue a control signal to the control logic 210 to cause thetask to be scheduled for execution, rather than immediately executed.Hence, taking the example of the DMA start instruction, this can beperformed directly if the required resources are available, or in thecase that the shared resource is not yet available, the task associatedwith the DMA start instruction can be added to a queue by the controllogic 210, such that the required task is started when the resourcebecomes available.

In some embodiments, one of the shared resources can be a communicationstransfer element coupling the data engine 60 with another processingdevice, be that another data engine, the host processor 20, etc. In suchan embodiment, the SCFU 270 can be used to synchronise communicationsand processing between the associated data engine core 130 and thatother processing unit. This mechanism can hence, for example, be used toachieve synchronisation between the data engine core 130 and that otherprocessing unit, thus for example providing a mechanism for performingthread synchronisation akin to the type of thread synchronisation thatcan be performed as an operating system function.

FIG. 4 is a flow diagram illustrating steps performed with respect tothe data engine 60 when initialising a session. At step 300, the sessionis initialised by the host processor 20, whereafter at step 310 the hostprocessor 20 is arranged to configure the data engine subsystem 100 byissuing appropriate configuration data to the configuration port 202 ofthe data engine subsystem 100. In this embodiment, the data engine core130 is then configured explicitly through the data engine subsystem.Once the configuration has taken place, the data engine core 130 can bestarted at step 320 in order to begin processing of the sequence oftasks allocated to the data engine core by the host processor. When itis subsequently determined at step 330 that all of those allocated taskshave been completed by the data engine core, then the data engine corecan be stopped at step 340. It should be noted that whilst all of theallocated tasks within a particular session are being performed by thedata engine core, the configuration of the data engine subsystem doesnot change.

FIG. 5 is a transaction diagram illustrating transactions occurringbetween various elements of the data processing apparatus when the dataengine core initiates a DMA transfer task. Firstly, a host process 410executing on the host processor 20 causes a session to start, whereafterthe host process issues a transaction to the DMA logic 400 (one of theshared resources 50 of FIG. 1) to configure that DMA for use by the dataengine 60. Additionally, the host process initiates a transaction to thedata engine subsystem 100 to cause the DMA interface 220 therein to beconfigured appropriately to enable the data engine core to communicatewith the DMA logic 400. In FIG. 5, this process is referred to asparameterisation, generally this process involving the configuration ofthe data engine subsystem 100 for the particular session in question.

Once this configuration takes place, the host process will access thecontroller 140 of the data engine core 130 via its configuration port142 in order to load the sequence of instructions associated with therequired tasks in to program memory, whereafter the host process 410 canstart the required tasks by communicating with the controller 140 viaits associated control port 143. This will typically cause a number ofcomputations to be performed by the associated data path 150 and at somepoint this may result in the execution of a DMA start instruction. Onexecuting this instruction, the controller 140 contacts the SCFU 270 tocause the transfer of a DMA run command via the control logic 210 to theDMA interface 220 within the data engine subsystem. It should be notedthat the SCFU 270 also at this time returns a DMA start return flag tothe controller 140 to indicate that the DMA start instruction has beenactioned. The controller 140 requires the return of this flag to enableit to continue execution of further instructions and resultant routingof control signals to appropriate functional units within the data path150.

When the DMA run command is received by the DMA interface 220, it willissue a transfer indicate signal to the DMA logic 400 indicating that itis supplying data which it wishes the DMA to transfer. In associationwith this transfer indicate signal, the actual data will be output tothe DMA logic 400. For example, with reference to FIG. 3, this data maybe data that is being routed from the TCM 230 to some memory device inthe external environment. When the DMA accepts this block of data, itissues a transfer response signal back to the DMA interface 220, thissignal basically acknowledging that the data has been accepted, andindicating that the DMA 400 is available to receive further blocks ofdata. Each block of data to be transferred will involve the exchange ofa transfer indicate signal and associated transfer response signalbetween the DMA interface 220 and the DMA logic 400.

In the example of FIG. 5, it is assumed that the controller 140continues during this period to run through the sequence ofinstructions, and at some point reaches a DMA done instruction which onexecution causes the SCFU 270 to communicate with the control logic 210to determine whether the DMA process has been completed. However,completion of the DMA process will only be indicated once the DMAinterface 220 has returned a DMA complete signal to the control logic210 and SCFU 270. Accordingly, during this period, it is not possible toreturn a DMA done return flag to the controller 140, and accordingly thecontroller 140 stalls, as shown in FIG. 5.

Only once the DMA transfer has completed, and the appropriate DMAcomplete signal has been returned to the SCFU 270, can the SCFU 270issue a DMA done return flag to the controller 140, whereafter thecontroller 140 can continue its operation. At some point once all of theallocated tasks have been completed, the controller 140 will issue a“Tasks Done” signal to the host process 410.

FIG. 6 is a transaction diagram illustrating another example of aprocess that may be implemented on the data processing apparatus of anembodiment of the present invention making use of the SCFU 270. In thisexample, the shared resource of relevance is a VIC 430. In the same wayas discussed earlier with reference to FIG. 5, when the host process 410starts a session, it will configure the shared resource, in this casethe VIC 430 and also cause configuration of the data engine subsystem100, in this case the relevant component being the interrupt interface420, which can be considered to reside within the control logic 210.When the tasks to be run by the data engine core 130 are then started,the controller 140 will start executing the sequence of instructions anddispatching corresponding control signals to the relevant functionalunits of the data path 150. When it reaches a point where an interruptis required, it will execute an interrupt signal generation instructioncausing a corresponding control signal to be routed to the SCFU 270. TheSCFU will then send a return flag to the controller 140 to allow thecontroller 140 to continue execution, and also will issue an interruptsend command to the interrupt interface 420 within the data enginesubsystem 100. This will cause an interrupt signal to be output to theVIC 430 from the data engine subsystem, resulting in an interruptacknowledgement response signal being returned from the VIC 430 to theinterrupt interface 420 to indicate acceptance of the interrupt by theVIC. An interrupt receive signal will then be passed on via the controllogic 210 to the SCFU 270 to identify that the interrupt has beenaccepted.

Meanwhile the controller 140 continues execution, and at some subsequentpoint requires generation of a blocking interrupt, such a blockinginterrupt being used as a synchronisation type of instruction where thecontroller 140 will stall execution until it knows that the interrupthas been accepted by the VIC 430. In particular, as shown, even thoughthe flag is returned from the SCFU 270 following receipt of the blockinginterrupt signal, this merely results in the controller 140 executing afurther instruction (IRQ_waitfor_b( )) causing the SCFU 270 to check inconsultation with the control logic 210 whether the interrupt has beenacknowledged by the VIC 430.

Meanwhile, the receipt by the SCFU 270 of the control signal associatedwith the original interrupt signal blocking instruction will have causedthe SCFU to route to the interrupt interface 420 an interrupt sendcommand, which in turn will have caused an interrupt indication to berouted to the VIC 430. When the VIC 430 subsequently acknowledgesreceipt of that interrupt, this will cause an ack response to bereturned to the interrupt interface 420, which in turn will cause aninterrupt receive signal to be returned via the control logic 210 to theSCFU 270. Only on receipt of this receive signal can the SCFU 270 returnthe flag in response to the IRQ_waitfor_b( ) instruction previouslyexecuted by the controller 140. Furthermore, only when this flag hasbeen returned to the controller 140 can the controller 140 exit itsstall state and continue execution.

In one embodiment, an ID is included in association with the variousinterrupt signals issued in FIG. 6, so that when more than one interruptis in the process of being handled at any point in time, the individualsignals can be correlated to a particular one of those interrupts.

FIG. 7 is a further example of tasks that can be performed on the dataprocessing apparatus 10 of one embodiment employing use of the SCFU 270.In this case, the shared resources comprise both DMA logic 400 and someshared memory controlled by a memory controller 440. In the particularexample in question, it is assumed that multiple data engine cores sharethe same data engine subsystem, and hence a memory resource such as theTCM 230 within the data engine subsystem is shared between multiple dataengine cores. Hence in this example, the memory controller 440 can beconsidered to reside within the TCM 230 of FIG. 3.

When the session starts, the DMA logic 400 and memory controller 440 areconfigured in a similar manner to that discussed earlier with referenceto FIGS. 5 and 6. In this example, it is assumed that data is to betransferred from the external environment via the DMA logic 400 into theTCM memory 230, and in particular into a software FIFO maintained withinthe TCM 230. Accordingly, the DMA 400 is started, and thereafter thetasks are dispatched to the controller 140. This will cause thecontroller 140 to execute a set FIFO instruction, as a result of whichthe SCFU 270 will be caused to issue a control command to the memorycontroller 440 providing some parameters defining the FIFO to be set upwithin the memory. Also a set FIFO return flag is returned to thecontroller 140, whereafter a start FIFO instruction is executed, thiscausing an enable FIFO command to be sent from the SCFU 270 to thememory controller 440. Again, a return flag is returned to thecontroller 140.

Periodically, the memory controller 440 will send status information tothe SCFU 270 indicating the status of the FIFO, for example whether itis empty, not empty, or full. Further, at some point during execution ofthe sequence of instructions, the controller will cause a query FIFOinstruction to be executed resulting in a query signal being routed tothe SCFU 270, with the return flag being returned to the controller 140once the next piece of status is provided to the SCFU from the memorycontroller 440. During the intervening period, the controller 140 willstall as shown in FIG. 7.

As shown in FIG. 7, once the DMA logic 400 has been started, and theFIFO has been enabled, blocks of data will be transferred between theDMA logic 400 and the TCM 230, with the relevant control signals beingrouted between the DMA logic 400 and the associated memory controller440. Hence, a transfer request signal from the DMA logic 400 will beaccompanied by the data being transferred, and the memory controller 440will send a transfer confirm signal back to the DMA logic 400 when itreceives that data.

At some stage, the continued transfer of data via the DMA logic 400 intothe FIFO provided within the TCM 230 will result in the FIFO becomingfull, which will be indicated to the SCFU 270 by the issuance of a fullFIFO signal from the memory controller 440 to the SCFU 270. At thispoint, any further data that the DMA logic 400 is seeking to transfercannot be accepted by the TCM, as indicated by the hold loop shown inFIG. 7.

Meanwhile, instructions being executed on the data engine core will makeuse of the data in the FIFO, and at some point certain parts of thatdata in the FEFO will no longer be required. At this point, thecontroller 140 will execute a move tail FIFO instruction, which willcause the SCFU 270 to issue a control signal to the memory controller440 indicating that the FIFO is no longer full (i.e. no longer is fullof data that is still required by the data engine core). At this pointthe memory controller 440 can accept the data the subject of a pendingtransfer request from the DMA logic 400, and accordingly return therequired transfer confirm signal hence bringing to an end the holdprocess being executed on the DMA logic 400.

When the control signal is issued to the memory controller 440 from theSCFU 270 indicating that the FIFO is no longer full, a move tail FIFOreturn flag is also returned to the controller 140 to enable thecontroller to continue execution.

At some point, the data engine core 150 will have no further use for thesoftware FIFO set up within the TCM 230, and accordingly the controller140 can be arranged to execute a release FIFO instruction, which in turncauses a disable FIFO control signal to be routed from the SCFU 270 tothe memory controller 440.

FIG. 8 is a transaction diagram illustrating another example of aprocess that may be implemented on the data processing apparatus of anembodiment of the present invention making use of the SCFU 270. Inparticular, in accordance with this example, the controller 140 withinthe data engine core 130 can be arranged when executing a currentfunction/task to call a predecessor function/task, with the currentfunction being automatically called back after completion of thatpredecessor function. The configuration manager 450 illustrated in FIG.8 will typically reside in the control logic 210 of the data enginesubsystem 100 shown in FIG. 3, and will provide an interface at thesession layer which is used to maintain the state of a session.Similarly, the co-operative operating system (OS) block 460 shown inFIG. 8 can be viewed as residing within the control logic 210, and isused to control the scheduling of tasks.

As shown in FIG. 8, the host process 410 executing on the host processor20 causes a session to start, whereafter the host process issues atransaction to the configuration manager 450 to configure theconfiguration manager. Additionally, the host process initiates atransaction to the co-operative OS block of the data engine subsystem100 to configure/parameterise that block for the particular session inquestion.

Once this configuration has taken place, the host process 410 issues arun command to the co-operative OS block 460 to indicate that the dataengine can now begin processing tasks. At this point, the co-operativeOS block 460 will determine a first task to be performed by the dataengine core, and will output a task start command to the controller 140identifying that task. In example illustrated in FIG. 8, this task is anoutput task, such as would be used in order to cause the data enginecore to generate some output data. At this point, the controller 140, inassociation with the data path logic 150 as appropriate, will determinewhether the data engine core 130 has the required input data to enableit to perform the output task.

In the example illustrated in FIG. 8, it is determined that the requiredinput data is not currently present, and at this point, the controller140 executes a set callback instruction in order to issue a set callbackcontrol signal to the SCFU 270 identifying itself as a parameter of thecallback instruction. In addition, a set token instruction is executedin order to issue a set token control signal to the SCFU 270, againidentifying itself as a parameter of that instruction. The set callbackcontrol signal will cause the SCFU to issue a control command to thedata engine subsystem identifying that the controller 140 should becalled back when the data required for the output task is available, andthe set token control signal causes the SCFU to issue informationidentifying how to contact that particular controller 140, for examplewhich communication channel to use, etc. However, in the exampleillustrated in FIG. 8, this information is bundled by the SCFU 270 withother information required as a result of execution of a call previousinstruction by the controller 140. Execution of the call previousinstruction will cause the SCFU to determine the previous task (ie theone preceding the output task) and to then issue a register task commandto the co-operative OS block 410 within the data engine subsystem 100identifying that previous task. The presence of the callback request,and the associated token information, will also be bundled into thisregister task command returned to the co-operative OS block 460.

Receipt of the register task command by the co-operative OS block 460will cause the previous task to be registered with the co-operative OSblock, along with an indication that on completion of that previous taska callback operation is required to the controller 140.

As shown in FIG. 8, when the call previous instruction is acted upon bythe SCFU 270, this will cause a call previous return flag to be returnedto the controller 140, on receipt of which the controller 140 is able toexit the output task and return a task done command to the co-operativeOS block 460.

On receipt of the task done command from the controller 140, theco-operative OS block 460 seeks to obtain the next task from a list oftasks that it maintains. Since no intervening tasks have beenregistered, the next task obtained from the list will be that taskregistered as the result of the register task command discussed earlier,ie the task preceding the output task. The co-operative OS block 460will then issue the get task info command to the configuration manager450 in order to obtain information about the task, resulting in a sendtask info command being returned from the configuration manager 450 tothe co-operative OS block 460 incorporating the necessary information.

Thereafter, the co-operative OS block 460 can issue a task start commandto the controller 140 identifying that task, which in this instance isan input task. This will cause a number of computations to be performedby the associated data path in order to obtain the required input data.Since at the time this current task being executed had been registeredwith the co-operative OS block 460, a callback request had also beenassociated with that task, then on completion of the necessarycomputations required by that task, the controller 140 will be arrangedto execute a call callback instruction causing a call callback controlsignal to be routed to the SCFU identifying as parameters a tokenidentifying the controller 140 as the recipient for the task allocatedas a result of this callback operation. The call callback control signalwill cause the SCFU to issue a register task command to the co-operativeOS block 460 identifying the relevant token, and this will cause theco-operative OS block 460 to register a task with that associated token.Also, on issuing the register task command, a call callback flag will bereturned to the controller 140 from the SCFU, whereafter the controllercan issue a task done command to the co-operative OS block 460.

On receipt of the task done command, the co-operative OS block 460 thenobtains the next task from the list, this being a task identifying thecontroller 140 as the recipient by virtue of the token information, andthen as before the co-operative OS block 460 will communicate with theconfiguration manager 450 in order to obtain the necessary details ofthat task. The task required will be the task following the input task,which will be the earlier-mentioned output task. Accordingly, thatoutput task is routed to the controller 140 via a task start command,the earlier mentioned token identifying that this command should be sentto this particular controller. At this point, the controller checks forinput, but this time the input is available, and accordingly thenecessary computations required by the output task can then beperformed. On completion of the output task, a corresponding task donesignal is then returned to the co-operative OS block 460, and if this isthe last task in the session allocated to the co-operative OS block,this will cause a tasks done command to be returned to the host process410.

By the approach illustrated schematically with reference to FIG. 8, theSCFU 270 allows the data engine core to be implemented as a singlecontext minimum overhead processor (for example you cannot interrupt itto do another task for a moment), since the SCFU offers an ApplicationProgramming Interface (API) that allows a task to register other taskswith a scheduler part of the operating system. Since that scheduler partof the operating system (which in one embodiment resides within the dataengine subsystem 100) is also responsive to system events that lead tosystem requested tasks being scheduled, the whole system still behavesas standard event driven software is expected to, but the data enginecore retains the simplicity of a “single-function-at-a-time” task-levelaccelerator. This ability offered by the SCFU to allow a task executingon the data engine core to register other tasks with the scheduler partof the operating system will be referred to herein as “task chaining”.

It will be appreciated that when employing embodiments which supportsuch task chaining functions, the system programming interface can bearranged to be systematic and object oriented, where sequences of taskchains can be configured, which from that point on run in a dynamicautonomous fashion.

When adopting an embodiment such as that shown in FIG. 8, where aco-operative OS block 460 is used to schedule tasks for execution by thedata engine core, then it will be appreciated that the earlier describedflow diagram of FIG. 4 may be modified. In particular, step 330 of FIG.4 would be a decision block determining whether all tasks currentlyallocated to the data engine core have been completed. When those tasksare completed, then an intervening step would in one embodiment beplaced between steps 330 and 340, where it is determined whether thereare any new tasks pending, this being determined by the co-operative OSblock. If there were, then those new tasks would be allocated to thedata engine core and the process would return to step 330. However, ifit was determined that there were no pending new tasks, then the processwould proceed to step 340.

FIG. 9 illustrates a further example of tasks that can be performed onthe data processing apparatus of one embodiment employing use of theSCFU 270. In such embodiments, a stub layer 470 is provided within thedata engine. In one embodiment, this stub layer 470 can be provided assoftware executing within the data path 150 of the data engine core 130,whilst in another embodiment the stub layer may be implemented by amixed hardware and software approach, where in addition to some softwareexecuting on the data path 130, some of the functionality of the stublayer is provided within the control logic 210 of the data enginesubsystem 100. In contrast to the earlier described examples where thetask start command is issued to the controller 140 of the data enginecore, in this embodiment, such task start commands are issued to thestub layer 470, which then performs some initial steps before decidingwhether to propagate the task start command onto the controller 140.

In particular, as shown in FIG. 9, when a session is started, the hostprocess 410 configures the configuration manager 450, and also issues aparameterise command to the stub layer 470 to configure the stub layerfor the particular session. Thereafter, a task start initiate command isissued to the stub layer 470, the stub layer being responsive to receiptof that command to check whether certain resources required forexecuting that task are available, such resources also being referred toherein as prerequisites. Thus, as an example, the stub layer 470 maytest whether all required resources, such as program data, constanttable data, state allocations, etc are present. Hence, in general terms,it can be seen that the stub layer 470 is arranged to check whethereverything needed for execution of the task is available to the dataengine core that is to execute that task.

In the example illustrated in FIG. 9, the stub layer determines that theprogram memory has not been initialised, and accordingly issues arequest signal to the SCFU 270, in this particular example that requestsignal being a “program memory not initialised” signal. This requestsignal causes the SCFU 270 to issue a download program indication to theconfiguration manager 450 to cause the configuration manager to downloadthe necessary program into the required program memory, whereafter adownload program response signal is returned to the SCFU 270. This thenresults in the issuance of a return flag from the SCFU 270 to the stublayer 470. In the intervening period, the stub layer 470 enters a “waitfor” loop awaiting receipt of the return flag. Upon receipt of thereturn flag, the stub layer 470 then knows that all required resourcesfor the task are available, and accordingly issues the task startcommand to the controller 140 to cause the task to be executed. Thisresults in a series of computations, and on completion of the task, atask done command is sent from the controller 140 to the host process410.

On receipt of the task done command, the host process 410 can then issueanother task start command to the stub layer 470. In the exampleillustrated in FIG. 9, when the stub layer 470 then checks forresources, it determines that all resources are available, andaccordingly issues the task start command to the controller 140, tocause the required computations to be performed. At some point duringthat computation, the controller 140 may issue a blocking interrupt, forexample to cause a synchronisation step to take place. As discussedearlier with reference to FIG. 6, the controller 140 may issue anIRQ_waitfor_b( ) signal to the SCFU 270, causing the SCFU 270 to checkin consultation with the control logic 210 whether a previously issuedblocking interrupt has been acknowledged by the interrupt controllerhandling that interrupt. Whilst awaiting that confirmation, the SCFU 270continues to test for the receipt of that interrupt, and the controller140 stalls.

In the example of FIG. 9, some event occurs causing a task abort commandto be issued from the host process 410 to the SCFU 270 whilst thisreceipt for the blocking interrupt is awaited. In this instance, thetask abort command is sent directly to the SCFU 270, since the softwareexecuting on the data engine, including the stub layer 470, is stalledawaiting the response from the blocking interrupt. On receipt of thetask abort command by the SCFU, the SCFU is arranged to cause an abortand exit command to be issued to the controller 140 which causes thecontroller to abort and exit its current process, and send anacknowledgement to that effect to the SCFU 270. On receipt of thatacknowledgement, the SCFU 270 then issues a run exit command to the stublayer 470, which is now no longer stalled and can accordingly initiatean exit procedure by sending a task start command to the controller 140identifying an exit routine. The controller 140 will then in associationwith the data path 150 execute the desired computations for the exitroutine, following which a task done command will be returned to thehost process 410.

From the discussion of FIG. 9, it will be seen that the stub layer 470can enable the implementation of a generalised task model on the dataengine. In particular, a task allocated from the host process to thedata engine now no longer merely contains an execution part. Instead,the execution part is now only one of several methods incorporated inthe task, such as initiate (the constructor), exit (the destructor),save_state, restore_state, etc. The stub layer forms a software layer,which in one embodiment takes the form of a minimal resident program.The SCFU is then able to respond to commands issued by the stub layer470, as for example discussed earlier with respect to the upper part ofFIG. 9. Furthermore, the stub layer can handle exceptions and exitconditions when instructed to do so by the SCFU 270.

The SCFU 270 allows the data engine core to initiate tasks on manyresources, and those tasks will potentially run concurrently, depend onthe availability and response of shared system resources, and may bemodelled as blocking instructions on the data engine side. Due to thesefactors, an error condition trapped by the host process 410 may resultin the data engine core being stalled while waiting for the return of ablocking function, as for example was the case discussed with regards tothe lower half of FIG. 9. It is due to this possibility that in theembodiment illustrated in FIG. 9 the SCFU 270 is responsive to softreset signals from the host process 410, for example the task abortsignal illustrated in FIG. 9, which results in the data engine coreaborting its blocking instruction and the exit routine of the stub beingexecuted (as was discussed above with regards to the lower part of FIG.9).

FIG. 10 is a diagram schematically illustrating a region of memory thatin one embodiment forms a shared resource allocated to the data engine,and in particular indicates two types of change which can be instigatedwith respect to that memory portion. In particular, when a session isstarted, the host processor 20 will define boundaries between particularmemory regions within that shared memory, and accordingly will definethe boundaries 602, 604 and 606 that exist between program (P) memory,two different portions of data memory (referred to as X and Y), and someregister memory (as shown in the view 600 of FIG. 10). The registermemory is used by DMA logic, and in particular different devices thatmay use the DMA logic will set particular registers in the DMA registerregion of memory when they wish to use the DMA logic, and the DMA logicwill review the registers in order to determine when it is required toperform DMA transfers.

As shown in FIG. 10, if an MP3 decode function is to be provided, thenSCFU 270 can issue appropriate control signals to the memory manager viathe control logic 210 to cause different parts of the memory to beallocated for use by the MP3 decode function. In particular, the MP3decode program instructions can be allocated a particular part of theprogram memory, certain data such as MP3 coefficients and Pulse CodeModulation (PCM) data can be allocated regions within the X data memory,and MP3 state data can be allocated a region within the Y data memory.

If at some point, a second instantiation of the MP3 decoder is required,then this requires a portion of X data memory to be allocated forfurther PCM data, and also a portion of the Y data memory to beallocated for MP3 state data associated with the second MP3 decoder.However, as the existing boundaries 602, 604 defining the X data memoryleave insufficient space for such PCM data to be allocated, thisrequires the session manager of the host processor to change thesession, this resulting in the new boundaries 612, 614, 616 asillustrated in the view 610 of FIG. 10. Now the additional PCM dataregion in the X data memory and the MP3 state region in the Y datamemory can be defined.

If subsequently a mixer function is also instantiated, then thisrequires a region of program memory to be allocated to the mixer programinstructions, and also a portion of the Y data memory to be allocatedfor mixer state. Since typically the outputs from MP3 decoders will bemixed prior to further outputs being generated, it is no longernecessary to have two PCM regions within the X data region. As shown bythe view 620 in FIG. 10, the change of use between the view 610 and theview 620 can be effected by causing the SCFU 270 to act upon appropriatemanagement instructions to enable dynamic runtime management of thememory, and in particular to establish the mixer region in the programmemory and the mixer state region in the Y data memory, along with thefreeing up of the second PCM region in the X data memory. It should benoted that in this case the boundaries 612, 614 and 616 set up by thehost processor do not change.

Whilst in the above discussion of embodiments of the present invention,a main processing unit has been described as connected to a single layerof one of more data engines, it is also possible to arrange a number ofdata engines in a hierarchical manner. For example, the main processingunit can present itself to a higher level of hierarchy as a data engine.In such a scenario, it would have a resource manager unit (SCFU) whichinteracts with the subsystem that connects it to a higher level mainprocessing unit. The top level main processing unit is most likely ageneral purpose CPU, but any intermediate main processing units could bedata engines. The data engines can also be general purpose CPUs, or onlythe cores of those CPUs. In this regard, the distinction between a mainprocessing unit and its data engines is that the main processing unitcontrols the shared resources at startup. The data engines can only useshared resources that were allocated to them by the main processingunit.

From the above description of embodiment of the present invention, itwill be seen that the data engine synchronizes to actions activatedthrough the SCFU in one of a number of ways:

-   -   it stalls until the action is finished;    -   it issues another command that will stall until the first action        is finished;    -   it issues a command to request the status of the previous        command (started, finished, error, . . . );    -   it writes status bits directly to specified locations in a        status register file accessible by the controller of the data        engine core, allowing conditional jumps to act on them        immediately; or    -   it stalls when a task ends, until actions assigned to the task        have finished.

From the above description of embodiments of the present invention, itwill be appreciated that embodiments of the present invention can bearranged to exhibit the following features:

-   -   The data engine subsystem can be managed on a session level, and        resources allocated to the DESS at the session level;    -   The resources can be used locally during the session with the        goal of minimising system activity, hence improving performance        and reducing energy consumption; and    -   The system programming interface can be systematic, object        oriented, where sequences of tasks/function chains can be        configured, which from that point on run in a dynamic autonomous        fashion.

From the above description of embodiments of the present invention, itwill be appreciated that such embodiments provide a particularlyefficient implementation of a data engine, which is particularly costeffective through the use of shared resource(s), and which also reducesthe likelihood that software needs to be re-written for execution on adata processing apparatus including such a data engine, through theprovision of the SCFU logic which can cause the data engine core to actas master device with respect to the data engine subsystem to manage useof the allocated shared resource(s).

Although particular embodiments have been described herein, it will beappreciated that the invention is not limited thereto and that manymodifications and additions thereto may be made within the scope of theinvention. For example, various combinations of the features of thefollowing dependent claims could be made with the features of theindependent claims without departing from the scope of the presentinvention.

1. A data processing apparatus comprising: a main processing unitconfigured to perform a plurality of data processing tasks; a dataengine configured to perform a number of said data processing tasks onbehalf of the main processing unit; at least one shared resourceallocated to the data engine by the main processing unit for use by thedata engine when performing said number of data processing tasks; thedata engine comprising a data engine core configured to perform saidnumber of data processing tasks, and a data engine subsystem configuredby the main processing unit to manage communication between the dataengine core and said allocated shared resource; the data engine corecomprising a resource manager unit configured to act as a master devicewith respect to the data engine subsystem for managing use of theallocated shared resource, wherein the number of data processing tasksto be performed by the data engine comprise a sequence of instructions,including at least one instruction of an instruction set executable bythe data engine core to cause said resource manager unit to act as saidmaster device, upon execution of said at least one instruction theresource manager unit is configured to issue a control command to thedata engine subsystem to thereby manage use of the allocated sharedresource.
 2. A data processing apparatus as claimed in claim 1, whereinthe data engine subsystem comprises control logic circuitry configuredto receive the control command from the resource manager unit and tocontrol use of the allocated shared resource dependent on that controlcommand.
 3. A data processing apparatus as claimed in claim 1, whereinthe instruction set executable by the data engine core comprises atleast one transfer initiation instruction which when executed causes theresource manager unit to act as said master device.
 4. A data processingapparatus as claimed in claim 1, wherein the allocated shared resourceand the data engine core operate concurrently with each other, and theinstruction set executable by the data engine core comprises at leastone synchronisation instruction which when executed causes asynchronisation to occur between the allocated shared resource and thedata engine core.
 5. A data processing apparatus as claimed in claim 4,wherein when the main processing unit indicates a new configuration forthe data engine subsystem, the data engine core is configured to executeone of said synchronisation instructions in order to cause asynchronisation point to be reached where the allocated shared resourceand the data engine are synchronised, and the new configuration is onlyeffected within the data engine subsystem after the synchronisationpoint is reached.
 6. A data processing apparatus as claimed in claim 1,wherein the data engine core comprises data path logic circuitryconsisting of a plurality of functional units, one of said functionalunits being the resource manager unit, the data engine core furthercomprising a controller configured to control, for each instruction inthe sequence, which functional unit acts upon that instruction.
 7. Adata processing apparatus comprising: a main processing unit configuredto perform a plurality of data processing tasks; a data engineconfigured to perform a number of said data processing tasks on behalfof the main processing unit; at least one shared resource allocated tothe data engine by the main processing unit for use by the data enginewhen performing said number of data processing tasks; the data enginecomprising a data engine core configured to perform said number of dataprocessing tasks, and a data engine subsystem configured by the mainprocessing unit to manage communication between the data engine core andsaid allocated shared resource; the data engine core comprising aresource manager unit configured to act as a master device with respectto the data engine subsystem for managing use of the allocated sharedresource, wherein the number of data processing tasks to be performed bythe data engine comprise a sequence of instructions, including at leastone instruction of an instruction set executable by the data engine coreto cause said resource manager unit to act as said master device, uponexecution of said at least one instruction the resource manager unit isconfigured to issue a control command to the data engine subsystem tothereby manage use of the allocated shared resource, the data processingapparatus further comprising: a data engine compiler configured toschedule said sequence of instructions for execution by the data enginecore, wherein the instruction set executable by the data engine corecomprises at least one bound instruction identifying a bound condition,the compiler configured, on encountering one of said bound instructions,to schedule execution of subsequent instructions in the sequence havingregard to the bound condition.
 8. A data processing apparatuscomprising: a main processing unit configured to perform a plurality ofdata processing tasks; a data engine configured to perform a number ofsaid data processing tasks on behalf of the main processing unit; atleast one shared resource allocated to the data engine by the mainprocessing unit for use by the data engine when performing said numberof data processing tasks; the data engine comprising a data engine coreconfigured to perform said number of data processing tasks, and a dataengine subsystem configured by the main processing unit to managecommunication between the data engine core and said allocated sharedresource; the data engine core comprising a resource manager unitconfigured to act as a master device with respect to the data enginesubsystem for managing use of the allocated shared resource, wherein theresource manager unit is configured as a data transfer controllersynchronised with the data engine.
 9. A data processing apparatus asclaimed in claim 8, wherein the allocated shared resource comprises DMAlogic circuitry, and the resource manager unit is configured to act as aDMA master device to initiate a transfer of data using said DMA logiccircuitry.
 10. A data processing apparatus comprising: a main processingunit configured to perform a plurality of data processing tasks; a dataengine configured to perform a number of said data processing tasks onbehalf of the main processing unit; at least one shared resourceallocated to the data engine by the main processing unit for use by thedata engine when performing said number of data processing tasks; thedata engine comprising a data engine core configured to perform saidnumber of data processing tasks, and a data engine subsystem configuredby the main processing unit to manage communication between the dataengine core and said allocated shared resource; the data engine corecomprising a resource manager unit configured to act as a master devicewith respect to the data engine subsystem for managing use of theallocated shared resource, wherein the allocated shared resourcecomprises an interrupt controller, and the resource manager unit isconfigured to issue an interrupt for routing via the data enginesubsystem to the interrupt controller.
 11. A data processing apparatuscomprising: a main processing unit configured to perform a plurality ofdata processing tasks; a data engine configured to perform a number ofsaid data processing tasks on behalf of the main processing unit; atleast one shared resource allocated to the data engine by the mainprocessing unit for use by the data engine when performing said numberof data processing tasks; the data engine comprising a data engine coreconfigured to perform said number of data processing tasks, and a dataengine subsystem configured by the main processing unit to managecommunication between the data engine core and said allocated sharedresource; the data engine core comprising a resource manager unitconfigured to act as a master device with respect to the data enginesubsystem for managing use of the allocated shared resource, wherein thenumber of data processing tasks to be performed by the data enginecomprise a sequence of instructions, including at least one instructionof an instruction set executable by the data engine core to cause saidresource manager unit to act as said master device, upon execution ofsaid at least one instruction the resource manager unit is configured toissue a control command to the data engine subsystem to thereby manageuse of the allocated shared resource, and wherein the allocated sharedresource comprises a region of memory, and the instruction setexecutable by the data engine core comprises at least one managementinstruction to enable dynamic runtime management of the region ofmemory.
 12. A data processing apparatus comprising: a main processingunit configured to perform a plurality of data processing tasks; a dataengine configured to perform a number of said data processing tasks onbehalf of the main processing unit; at least one shared resourceallocated to the data engine by the main processing unit for use by thedata engine when performing said number of data processing tasks; thedata engine comprising a data engine core configured to perform saidnumber of data processing tasks, and a data engine subsystem configuredby the main processing unit to manage communication between the dataengine core and said allocated shared resource; the data engine corecomprising a resource manager unit configured to act as a master devicewith respect to the data engine subsystem for managing use of theallocated shared resource, wherein the number of data processing tasksto be performed by the data engine comprise a sequence of instructions,including at least one instruction of an instruction set executable bythe data engine core to cause said resource manager unit to act as saidmaster device, upon execution of said at least one instruction theresource manager unit is configured to issue a control command to thedata engine subsystem to thereby manage use of the allocated sharedresource and wherein the instruction set executable by the data enginecore comprises at least one scheduling instruction which when executedcauses a task to be scheduled for execution by the allocated sharedresource.
 13. A data processing apparatus comprising: a main processingunit configured to perform a plurality of data processing tasks; a dataengine configured to perform a number of said data processing tasks onbehalf of the main processing unit; at least one shared resourceallocated to the data engine by the main processing unit for use by thedata engine when performing said number of data processing tasks; thedata engine comprising a data engine core configured to perform saidnumber of data processing tasks, and a data engine subsystem configuredby the main processing unit to manage communication between the dataengine core and said allocated shared resource; the data engine corecomprising a resource manager unit configured to act as a master devicewith respect to the data engine subsystem for managing use of theallocated shared resource, wherein the number of data processing tasksto be performed by the data engine comprise a sequence of instructions,including at least one instruction of an instruction set executable bythe data engine core to cause said resource manager unit to act as saidmaster device, upon execution of said at least one instruction theresource manager unit is configured to issue a control command to thedata engine subsystem to thereby manage use of the allocated sharedresource, and wherein the instruction set executable by the data enginecore comprises at least one registering instruction which when executedwhilst the data engine core is performing a first data processing taskcauses a second data processing task to be registered for execution. 14.A data processing apparatus comprising: a main processing unitconfigured to perform a plurality of data processing tasks; a dataengine configured to perform a number of said data processing tasks onbehalf of the main processing unit; at least one shared resourceallocated to the data engine by the main processing unit for use by thedata engine when performing said number of data processing tasks; thedata engine comprising a data engine core configured to perform saidnumber of data processing tasks, and a data engine subsystem configuredby the main processing unit to manage communication between the dataengine core and said allocated shared resource; the data engine corecomprising a resource manager unit configured to act as a master devicewith respect to the data engine subsystem for managing use of theallocated shared resource, wherein the number of data processing tasksto be performed by the data engine comprise a sequence of instructions,including at least one instruction of an instruction set executable bythe data engine core to cause said resource manager unit to act as saidmaster device, upon execution of said at least one instruction theresource manager unit is configured to issue a control command to thedata engine subsystem to thereby manage use of the allocated sharedresource, and wherein the instruction set executable by the data enginecore comprises at least one callback instruction, if the data enginecore determines whilst performing a first data processing task that atleast one condition for performance of that task is not satisfied, thedata engine core is configured to execute the callback instruction tocause the resource manager unit to identify to the data engine subsystemthat the first data processing task should be re-invoked once said atleast one condition is satisfied, thereby allowing the data engine coreto terminate performance of the first processing task until the at leastone condition is satisfied.
 15. A data processing apparatus comprising:a main processing unit configured to perform a plurality of dataprocessing tasks; a data engine configured to perform a number of saiddata processing tasks on behalf of the main processing unit; at leastone shared resource allocated to the data engine by the main processingunit for use by the data engine when performing said number of dataprocessing tasks; the data engine comprising a data engine coreconfigured to perform said number of data processing tasks, and a dataengine subsystem configured by the main processing unit to managecommunication between the data engine core and said allocated sharedresource; the data engine core comprising a resource manager unitconfigured to act as a master device with respect to the data enginesubsystem for managing use of the allocated shared resource, wherein thedata engine comprises a stub layer which, when a data processing task isto be performed by the data engine core, is configured to check for oneor more prerequisites required by that data processing task beforeallowing the data processing task to be performed by the data enginecore, wherein the number of data processing tasks to be performed by thedata engine comprise a sequence of instructions, including at least oneinstruction of an instruction set executable by the data engine core tocause said resource manager unit to act as said master device, uponexecution of said at least one instruction the resource manager unit isconfigured to issue a control command to the data engine subsystem tothereby manage use of the allocated shared resource, and wherein theinstruction set executable by the data engine core comprises at leastone request instruction, when the stub layer determines that at leastone prerequisite required by the data processing task is not satisfied,the request instruction being executed to cause the resource managerunit to output a request command to the data engine subsystem asking forthat at least one prerequisite to be satisfied.
 16. A data processingapparatus comprising: a main processing unit configured to perform aplurality of data processing tasks; a data engine configured to performa number of said data processing tasks on behalf of the main processingunit; at least one shared resource allocated to the data engine by themain processing unit for use by the data engine when performing saidnumber of data processing tasks; the data engine comprising a dataengine core configured to perform said number of data processing tasks,and a data engine subsystem configured by the main processing unit tomanage communication between the data engine core and said allocatedshared resource; the data engine core comprising a resource manager unitconfigured to act as a master device with respect to the data enginesubsystem for managing use of the allocated shared resource, wherein thedata engine comprises a stub layer which, when a data processing task isto be performed by the data engine core, is configured to check for oneor more prerequisites required by that data processing task beforeallowing the data processing task to be performed by the data enginecore, wherein the number of data processing tasks to be performed by thedata engine comprise a sequence of instructions, including at least oneinstruction of an instruction set executable by the data engine core tocause said resource manager unit to act as said master device, uponexecution of said at least one instruction the resource manager unit isconfigured to issue a control command to the data engine subsystem tothereby manage use of the allocated shared resource, and wherein theinstruction set executable by the data engine core comprises at leastone error handling instruction, when at least one prerequisite requiredby the data processing task cannot be satisfied the error handlinginstruction being executed to cause the resource manager unit to outputany required error condition and cause the data processing task to beexited.
 17. A data processing apparatus comprising: a main processingunit configured to perform a plurality of data processing tasks; a dataengine configured to perform a number of said data processing tasks onbehalf of the main processing unit; at least one shared resourceallocated to the data engine by the main processing unit for use by thedata engine when performing said number of data processing tasks; thedata engine comprising a data engine core configured to perform saidnumber of data processing tasks, and a data engine subsystem configuredby the main processing unit to manage communication between the dataengine core and said allocated shared resource; the data engine corecomprising a resource manager unit configured to act as a master devicewith respect to the data engine subsystem for managing use of theallocated shared resource, wherein the number of data processing tasksto be performed by the data engine comprise a sequence of instructions,including at least one instruction of an instruction set executable bythe data engine core to cause said resource manager unit to act as saidmaster device, upon execution of said at least one instruction theresource manager unit is configured to issue a control command to thedata engine subsystem to thereby manage use of the allocated sharedresource, and wherein at least one instruction in the instruction setexecutable by the data engine core is arranged to cause the return of aflag to indicate if the instruction was executed successfully, wherebyin the absence of the flag the data engine core will stall and enter apower saving mode.
 18. A method of operating a data processing apparatushaving a main processing unit configured to perform a plurality of dataprocessing tasks, and a data engine configured to perform a number ofsaid data processing tasks on behalf of the main processing unit, themethod comprising the steps of: allocating to the data engine at leastone shared resource for use by the data engine when performing saidnumber of data processing tasks; performing said number of dataprocessing tasks using a data engine core of the data engine;configuring a data engine subsystem to manage communication between thedata engine core and the allocated shared resource; and employing aresource manager unit within the data engine core to act as a masterdevice with respect to the data engine subsystem for managing use of theallocated shared resource, wherein the number of data processing tasksto be performed by the data engine comprise a sequence of instructions,including at least one instruction of an instruction set executable bythe data engine core to cause said resource manager unit to act as saidmaster device, upon execution of said at least one instruction theresource manager unit is configured to issue a control command to thedata engine subsystem to thereby manage use of the allocated sharedresource.
 19. A data engine for a data processing apparatus having amain processing unit configured to perform a plurality of dataprocessing tasks, the data engine is configured to perform a number ofsaid data processing tasks on behalf of the main processing unit, andbeing allocated at least one shared resource of the data processingapparatus for use when performing said number of data processing tasks,the data engine comprising: a data engine core configured to performsaid number of data processing tasks; a data engine subsystem configuredby the main processing unit to manage communication between the dataengine core and the allocated shared resource; and a resource managerunit within the data engine core configured to act as a master devicewith respect to the data engine subsystem for managing use of theallocated shared resource, wherein the number of data processing tasksto be performed by the data engine comprise a sequence of instructions,including at least one instruction of an instruction set executable bythe data engine core to cause said resource manager unit to act as saidmaster device, upon execution of said at least one instruction theresource manager unit is configured to issue a control command to thedata engine subsystem to thereby manage use of the allocated sharedresource.